package top.lilele.adminSystem.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * 切面记录操作日志
 *
 * @author lilele
 */
@Slf4j
@Component
@Aspect
public class LogAspect {
    /**
     * 切点
     */
//    @Pointcut("@annotation(top.lilele.adminSystem.web.*)")
//    public void logPointCut() {
//        log.info("切点");
//    }
//
//    @AfterReturning(pointcut = "logPointCut()", returning = "jsonResult")
//    public void doAfterReturning(JoinPoint joinPoint, Object jsonResult) {
//        Signature signature = joinPoint.getSignature();
//        MethodSignature methodSignature = (MethodSignature) signature;
//        Method method = methodSignature.getMethod();
//        LogAnnotation annotation = method.getAnnotation(LogAnnotation.class);
//
//    }
//
//    @Before("logPointCut()")
//    public void doBefore() {
//        log.info("before");
//    }
}
